<template>
  <section class="container">
    <div class="shop">
      <div class="flex">
        <div class="avatar flex">
          <!-- <img :src="StoreMessage.avatarUrl" alt="">-->
          <img src="./../../assets/images/userAvatar.png" alt="">
        </div>
        <div class="shop-message">
          <div class="shop-name">
            <p>
              {{StoreMessage.name}}
            </p>
          </div>
          <div class="shop-collect">
            <p>
              {{StoreMessage.Collect}}{{ $t('personalCenter.favorite') }}.{{StoreMessage.publish}}{{ $t('personalCenter.publish') }}
            </p>
          </div>
        </div>
      </div>
      <div class="shop-address">
        <p>{{StoreMessage.storeType}}|{{ $t('personalCenter.ipLocation') }}：{{StoreMessage.ipTerritory}} </p>
      </div>
      <div class="edit flex">
        <div class="shop-edit">
          <p>{{ $t('personalCenter.editProfile') }}</p>
        </div>
        <div class="shop-share">
         <p>{{ $t('personalCenter.share') }}</p>
        </div>
      </div>
      <div class="line"></div>
      <div class="shop-menu">
        <div class="top-menu flex">
          <div style="display: flex" :class="{'btn-active': !isActive}" @click="collectType = 0;isActive = !isActive;"><p>{{ $t('personalCenter.themeFavorite')}} &nbsp</p><p>{{StoreMessage.Collect}}</p></div>
          <div style="display: flex" :class="{'btn-active': isActive}" @click="collectType = 1;isActive = !isActive;"><p>{{ $t('personalCenter.storeFavorite')}} &nbsp</p><p>{{StoreMessage.publish}}</p></div>
        </div>
      </div>
      <div class="collect-main">
        <block v-for="(item,index) in StoreMessage.SubjectCollection[collectType]">
          <div class="collect-item">
            <div class="item-image">
<!--              <img :src="item.imageUrl" width="285" height="406" alt="">-->
<!--              <img src="./../../assets/images/brandImage01.png" width="285" height="406" alt="">-->
              <img src="./../../assets/images/brandImage01.png" alt="">
            </div>
            <div class="item-message">
              <div class="item-type">{{item.brandType}}</div>
              <div class="item-name">{{item.brand}}</div>
            </div>
          </div>
        </block>
      </div>
    </div>
        <button @click="C">切换语言</button>
  </section>
</template>

<script lang="ts">
import { defineComponent, ref } from 'vue';
import { getApp } from '@/common/hooks';
import { Messages } from '@/components/Warm/Popup';
import { Language } from '@/common/lang';

export default defineComponent({
  name: "recruit",
  components: {

  },
  data() {
    return {

    }
  },
  setup() {
    const { proxy } = getApp(["Vm"]).Vm;

    const handle = () => {
      Messages({});
    }

    const C = () => {
      proxy.$i18n.locale = Language.kaien;
    }

    const StoreMessage = ref({
      name: "SANDRO官方旗舰店",
      Collect: 10,
      publish: 200,
      storeType: "旗舰店",
      ipTerritory: "重庆·垫江",
      avatarUrl: "@assets/images/userAvatar.png",
      SubjectCollection: [
          [
              {
              imageUrl: "@assets/images/brandImage01.png",
              brandType: "自主服装品牌",
              brand: "语舒秋寒"
            },
              {
                imageUrl: "@assets/images/brandImage01.png",
                brandType: "自主服装品牌",
                brand: "语舒秋寒"
              },
              {
                imageUrl: "@assets/images/brandImage01.png",
                brandType: "自主服装品牌",
                brand: "语舒秋寒"
              },
              {
                imageUrl: "@assets/images/brandImage01.png",
                brandType: "自主服装品牌",
                brand: "语舒秋寒"
              },
              {
                imageUrl: "@assets/images/brandImage01.png",
                brandType: "自主服装品牌",
                brand: "语舒秋寒"
              },
              {
                imageUrl: "@assets/images/brandImage01.png",
                brandType: "自主服装品牌",
                brand: "语舒秋寒"
              },
              {
                imageUrl: "@assets/images/brandImage01.png",
                brandType: "自主服装品牌",
                brand: "语舒秋寒"
              },
              {
                imageUrl: "@assets/images/brandImage01.png",
                brandType: "自主服装品牌",
                brand: "语舒秋寒"
              },
              {
                imageUrl: "@assets/images/brandImage01.png",
                brandType: "自主服装品牌",
                brand: "语舒秋寒"
              },
          ],
          [{
            imageUrl: "@assets/images/brandImage01.png",
            brandType: "自主服装品牌12",
            brand: "语舒秋寒12"
          },
            {
              imageUrl: "@assets/images/brandImage01.png",
              brandType: "自主服装品牌",
              brand: "语舒秋寒"
            },
            {
              imageUrl: "@assets/images/brandImage01.png",
              brandType: "自主服装品牌12",
              brand: "语舒秋寒12"
            },
            {
              imageUrl: "@assets/images/brandImage01.png",
              brandType: "自主12服装品牌",
              brand: "语舒秋寒12"
            },
            {
              imageUrl: "@assets/images/brandImage01.png",
              brandType: "自主服12装品牌",
              brand: "语舒秋寒"
            },
            {
              imageUrl: "@assets/images/brandImage01.png",
              brandType: "自主12服装品牌",
              brand: "语舒秋寒"
            },
            {
              imageUrl: "@assets/images/brandImage01.png",
              brandType: "自主12服装品牌",
              brand: "语舒秋寒"
            },
            {
              imageUrl: "@assets/images/brandImage01.png",
              brandType: "自主服装品牌",
              brand: "语舒12秋寒"
            },
            {
              imageUrl: "@assets/images/brandImage01.png",
              brandType: "自主12服装品牌",
              brand: "语舒秋寒"
            },]

      ]
    });
    const collectType = ref(0);
    const isActive = ref(true);

    const applyClickedStyle = () =>{
      isActive.value = !isActive.value;
    }

    return {
      StoreMessage,
      collectType,
      applyClickedStyle,
      handle,
      C

    }
  }
});
</script>

<style lang="scss" scoped>
.container {
  padding-left: 40Px;
  padding-top: 100Px;
}
.shop {
  width: 100%;
  .avatar {
    border-radius: 50%;
    //border: 1Px solid #4D4D4D;

    box-shadow: 0px 0px 20px 20px rgba(0, 0, 0, 0.15);
    width: 100Px;
    height: 100Px;
    justify-content: center;
    align-items: center;
    margin-right: $-pc-space-size-m;
  }
  .shop-message {
    padding-top: 50Px;
    .shop-name {
      color: $color-main;
      font-family: "PingFang SC";
      font-size: $-pc-font-size-l;
      font-style: normal;
      font-weight: 400;
      line-height: $-pc-font-size-l; /* 100% */
      margin-bottom: 10Px;
    }
    .shop-collect {
      color: $color-main;
      font-family: "PingFang SC";
      font-size: $-pc-font-size-sm;
      font-style: normal;
      font-weight: 400;
      line-height: $-pc-font-size-sm; /* 150% */
    }
  }
  .shop-address {
    margin-top: $-pc-space-size-m;
    color: #000;
    font-family: "PingFang SC";
    font-size: $-pc-font-size-sm;
    font-style: normal;
    font-weight: 400;
    line-height: $-pc-font-size-sm; /* 150% */
  }
  .edit {
    margin-top: $-pc-space-size-m;
    margin-bottom: $-pc-space-size-m;
    .shop-edit {
      cursor: pointer;
      color: #000;
      font-family: "PingFang SC";
      font-size: $-pc-font-size-sm;
      font-style: normal;
      font-weight: 400;
      line-height: 44Px; /* 150% */
      width: 116Px;
      height: 44Px;
      border: 1Px solid #E6E6E6;
      text-align: center;
    }
    .shop-share {
      cursor: pointer;
      margin-left: $-pc-space-size-l;
      color: #000;
      font-family: "PingFang SC";
      font-size: $-pc-font-size-sm;
      font-style: normal;
      font-weight: 400;
      line-height: 44Px; /* 150% */
      width: 72Px;
      height: 44Px;
      border: 1Px solid #E6E6E6;
      text-align: center;
    }
  }
  .line {
    width: calc(100vw - 80Px);
    //width: auto;
    //width: 1880Px;
    height: 1Px;
    background: #CCC;
    margin-bottom: $-pc-space-size-m;
  }
  .shop-menu{
    margin-bottom: 20Px;
    .top-menu {
      .btn-active {
        border-bottom: 2Px $color-main solid !important;
        p:first-child{
          color: $color-main !important;
        }

      }
    }
    div {
      margin-right: 95Px;
    }
    div p:first-child{
      cursor: pointer;
      color: #666;
      font-family: "PingFang SC";
      font-size: $-pc-font-size-sm;
      font-weight: 400;
      line-height: 24Px; /* 150% */
    }
    div p:nth-child(2){
      cursor: pointer;
      color: #666;
      font-family: "PingFang SC";
      font-size: $-pc-font-size-sm;
      font-weight: 400;
      line-height: 24Px;
    }
  }
  .collect-main {
    //width: 100%;
    //padding-right: 20Px;
    display: grid;
    //grid-template-columns: auto auto auto auto auto auto;
    grid-template-columns: 15.5% 15.5% 15.5% 15.5% 15.5% 15.5%;
    grid-gap: 1%;
    .item-image {
      img {
        width: 100%;
        height: 100%;
      }
    }
  }
  .item-message {
    .item-type {
      margin-top: 10Px;
      color: #000;
      font-family: "PingFang SC";
      font-size: $-pc-font-size-sm;
      font-style: normal;
      font-weight: 400;
      line-height: 24Px; /* 150% */
    }
    .item-name {
      color: #000;
      font-family: "PingFang SC";
      font-size: $-pc-font-size-sm;
      font-style: normal;
      font-weight: 400;
      line-height: 24Px; /* 150% */
    }
  }


}

</style>
